package com.wsj.dao;

import java.util.List;

import org.springframework.dao.DataAccessException;

import com.wsj.util.page.PageResultSet;
import com.wsj.web.subclass.displayBean.Magazine.MagazineExtendBean;
import com.wsj.web.vo.homeSite.Magazine;

public interface IMagazineDao {
	
	void add(Magazine magazine)throws DataAccessException;
	void delete(Integer id)throws DataAccessException;
	void update(Magazine magazine)throws DataAccessException;
	Magazine getMagazineById(Integer id)throws DataAccessException;
	Magazine getMagazineByName(String title)throws DataAccessException;
	
	
	public java.util.List<Magazine> loadByTime(Integer top)throws DataAccessException;
	public java.util.List<Magazine> loadByNameId(Integer nameId,Integer top)throws DataAccessException;
	
	
	PageResultSet loadMagazineByParam(String title,String content,String keyword,Integer hits,String username,Integer iscommend,Short isImg,Short shanchu,
			Short toptitle,Short gs,Short sh,int page,int pageSize,Integer magazineNameid,Integer magazineClassid)throws DataAccessException;
	PageResultSet loadMagazineByMagazineExtendBean(MagazineExtendBean magazineExtendBean)throws DataAccessException;
	
	/*****
	 * 获取前几个图片期刊新闻
	 * @param magazineNameId
	 * @param top
	 * @return
	 * @throws DataAccessException
	 */
	List<Magazine> loadPicMagazineListByMagazineNameIdDao(Integer magazineNameId, Integer top)throws DataAccessException;
	

}
